#include<stdio.h>
#include<malloc.h>
typedef int ElemType;
//声明双链表
typedef struct DNode
{
    ElemType data;
    struct DNode *prior;
    struct DNode *next;
}DLinkNode;
void exchange(DLinkNode *&L)
{
    DLinkNode *pre=L,*p=L->next;
    L->next=NULL;
    while(p!=NULL)
    {
        pre->prior=p;
        p->next=pre;
        while(p->next!=NULL)
        {
            pre=p;
            p=p->next;
        }
    }
}
int main()
{
    DLinkNode *h;
    ElemType e;
    printf("交换节点\n");
    exchange(h);
}